Skip to content

Support Web3signer distroless#2559

Open
yorickdowne wants to merge 1 commit intoethstaker:mainfrom
yorickdowne:web3signer-distroless
Open

Support Web3signer distroless#2559
yorickdowne wants to merge 1 commit intoethstaker:mainfrom
yorickdowne:web3signer-distroless

Conversation

@yorickdowne
Copy link
Copy Markdown
Collaborator

@yorickdowne yorickdowne commented Apr 22, 2026

What I did

Consensys introduced a latest-distroless tag. This supports it.

Requires Web3signer 26.4.2 or later

The migration warnings and failures have migrated into w3s-init

Dockerfile.binary is the default and will just run the entrypoint of whatever image the user chooses

Dockerfile.source still supports custom network processing

Add Web3signer CI

@yorickdowne yorickdowne requested a review from pietjepuk2 April 22, 2026 09:56
@yorickdowne yorickdowne force-pushed the web3signer-distroless branch 2 times, most recently from c34ef65 to f87bb03 Compare April 22, 2026 12:00
@yorickdowne yorickdowne force-pushed the web3signer-distroless branch 2 times, most recently from abac0c9 to 52bb597 Compare April 22, 2026 12:39
@yorickdowne yorickdowne marked this pull request as draft April 23, 2026 16:47
@yorickdowne yorickdowne force-pushed the web3signer-distroless branch from 52bb597 to ec4d8df Compare April 23, 2026 17:33
@yorickdowne yorickdowne marked this pull request as ready for review April 23, 2026 17:34
@yorickdowne yorickdowne marked this pull request as draft April 24, 2026 02:10
@yorickdowne yorickdowne force-pushed the web3signer-distroless branch from ec4d8df to e7b185d Compare April 27, 2026 06:51
@yorickdowne yorickdowne marked this pull request as ready for review April 27, 2026 06:51
@yorickdowne yorickdowne force-pushed the web3signer-distroless branch from e7b185d to f803d47 Compare April 27, 2026 06:58
Comment thread .github/workflows/test-web3signer.yml
Comment thread default.env Outdated
W3S_READ_ONLY=false
W3S_DOCKER_REPO=consensys/web3signer
# Use Dockerfile.custom-network for a custom devnet NETWORK. Doesn't support distroless.
W3S_DOCKERFILE=Dockerfile.slim
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably rather uncommon that people have custom networks. But this will break those setups right (until they explicitly change this value to Dockerfile.custom-network)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. I had a choice of breaking it entirely or gating it behind this change. I asked Consensys whether they use the feature. They do not. It's a feature that Pandaops had asked for on behalf of client teams, and I am now unsure whether any client teams use it.

It'd be used for stuff like "devnet3"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On further thought. You likely can't even run a custom devnet with an image, it'd need to be source-built. Which means no one is using this feature

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a Dockerfile.source for this use case

Comment thread ethd
Comment thread web3signer.yml
- /etc/localtime:/etc/localtime:ro
read_only: ${W3S_READ_ONLY:-false}
environment:
- JAVA_OPTS=${W3S_HEAP:--Xmx6g}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently this does not work with 'distroless' (according to Codex at least).

The web3signer script in the original image did

eval "set -- $(
          printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $WEB3SIGNER_OPTS" |
          xargs -n1 |
          sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
          tr '\n' ' '
      )" '"$@"'

  exec "$JAVACMD" "$@"

But distroless does not.

Can set JAVA_TOOL_OPTIONS instead, but... only for distroless? Or also for regular image?

Copy link
Copy Markdown
Collaborator Author

@yorickdowne yorickdowne May 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

read_only is a Docker option. This absolutely works. So well in fact they had to fix Web3signer-distroless because it'd break when I turned that on: Consensys/web3signer#1175

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AH ok, JAVA_OPTS. Yeah this likely doesn't work in distroless. We can point that out to Consensys as a bug

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave that for another PR. JAVA_TOOL_OPTIONS is a good choice; we'd need to verify it doesn't interfere with what regular web3signer is doing

@yorickdowne yorickdowne force-pushed the web3signer-distroless branch 9 times, most recently from ad4e08d to 7be65f7 Compare May 3, 2026 04:42
@yorickdowne yorickdowne force-pushed the web3signer-distroless branch from 7be65f7 to 618aa14 Compare May 3, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants